<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;


Route::post('dologinwithopenid', 'LoginController@dologinwithopenid');
Route::post('dologinwithmobile', 'LoginController@dologinwithmobile');
Route::post('dologinwithmobileandpassword', 'LoginController@dologinwithmobileandpassword');

Route::post('mock', 'LoginController@mock');

Route::group([
    'prefix' => 'common'
], function ($router) {
    Route::post('getswimg', 'CommonController@getswimg');
    Route::post('getcouponlist', 'CommonController@getcouponlist');
    Route::post('getcontactinfo', 'CommonController@getcontactinfo');
    Route::post('getwarrantycertificatesetting', 'CommonController@getwarrantycertificatesetting');
});


//需登录
Route::group([
    'prefix' => '',
    'middleware' => ['wxappislogin']
], function ($router) {
    Route::group([
        'prefix' => 'login'
    ], function ($router) {
        Route::post('dologinout', 'LoginController@dologinout');
    });
    Route::group([
        'prefix' => 'common'
    ], function ($router) {

    });

    Route::group([
        'prefix' => 'address'
    ], function ($router) {
        Route::post('getlist', 'AddressController@getlist');
        Route::post('getinfo', 'AddressController@getinfo');
        Route::post('dopostadd', 'AddressController@dopostadd');
        Route::post('dopostedit', 'AddressController@dopostedit');
        Route::post('dodel', 'AddressController@dodel');
        Route::post('dosetdefault', 'AddressController@dosetdefault');
    });

    Route::group([
        'prefix' => 'member'
    ], function ($router) {
        Route::post('getmeminfo', 'MemberController@getmeminfo');
        Route::post('changerealname', 'MemberController@changerealname');
        Route::post('bindoutwxaccount', 'MemberController@bindoutwxaccount');
        Route::post('pointstobalance', 'MemberController@pointstobalance');
        Route::post('dopointssign', 'MemberController@dopointssign');
        Route::post('pointslog', 'MemberController@pointslog');

        Route::post('getgiftlist', 'MemberController@getgiftlist');
        Route::post('getstoreidwithgiftlist', 'MemberController@getstoreidwithgiftlist');
        Route::post('pointsexchangelog', 'MemberController@pointsexchangelog');
        Route::post('pointsexchange', 'MemberController@pointsexchange');

        Route::post('getpointsupdays', 'MemberController@getpointsupdays');
        Route::post('getpointssettinginfo', 'MemberController@getpointssettinginfo');

        Route::post('memPerfect', 'MemberController@memPerfect');
    });

    Route::group([
        'prefix' => 'order'
    ], function ($router) {
        Route::post('getlist', 'OrderController@getlist');
        Route::post('getinfo', 'OrderController@getinfo');
        Route::post('getinfoinfo', 'OrderController@getinfoinfo');
    });

    Route::group([
        'prefix' => 'coupon'
    ], function ($router) {
        Route::post('getcouponinfo', 'CouponController@getcouponinfo');
        Route::post('getcoupon', 'CouponController@getcoupon');
        Route::post('getcouponres', 'CouponController@getcouponres');
    });

    Route::group([
        'prefix' => 'store'
    ], function ($router) {
        Route::post('storeList', 'StoreController@storeList');
    });
});
